<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>插件列表</title>
<link href="__PUBLIC__/admin/css/xc.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/css/xc.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.js"></script> 
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.md5.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/layer/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/common-1.0.js"></script> 
<style type="text/css">
.row-flex {display: flex;flex-wrap: wrap;}
.row {margin-left: -15px;margin-right: -15px;}
.item-addon {width:23%;margin-bottom: 15px;margin-left: 15px;}
.thumbnail {background-color: #fff;border: 1px solid #ddd;border-radius: 3px;display: block;line-height: 1.42857;margin-bottom: 17px;padding: 4px;transition: border 0.2s ease-in-out 0s;}
.thumbnail .caption {color: #333333;padding: 9px;}
.text-muted {color: #777777;}
</style>
</head>
<body>
<nav class="breadcrumb">
  <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span> 插件列表 
  <a class="btn btn-success radius r mr-20 btn-shua" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20">
  <div class="cl pd-5 bg-1 bk-gray mt-5"> 
    <span class="l"><a href="javascript:;"  onClick="plugAddEdit('添加插件','__MODULE__/Plugin/plugAddEdit','750','500')" class="btn btn-primary radius"><i class="Hui-iconfont"></i>添加插件</a></span>
  </div>
  <div class="mt-10"> 
    <div class="row row-flex">
    <volist name="list" id="vo" >
    <div class="item-addon">
      <div class="thumbnail addon">
        <a href="javascript:;">
          <img src="__PUBLIC__/Uploads/{$vo.pl_img|default='img/no_image.jpg'}" width="100%" height="160px" class="img-responsive" alt="{$vo.pl_name}">
       </a>
       <div class="caption">
       <h4 style="margin:0">{$vo.pl_name}</h4>
       <p class="text-muted">唯一标识: {$vo.pl_code}</p>
       <p class="operate">
         <if condition="($vo[pl_state] eq 1)">
           <a href="javascript:;" class="btn btn-primary btn-config" onClick="layer_show('参数配置','__MODULE__/Plugin/plugSet?id={$vo.pl_id}','650','400')"><i class="fa fa-pencil"></i> 配置</a>
           <a href="javascript:;" class="btn btn-danger btn-uninstall" onClick="update_state('plugin','pl_id={$vo.pl_id}','pl_state','2','卸载','2')"><i class="fa fa-times"></i> 卸载</a>
         <else />
           <a href="javascript:;" class="btn btn-success btn-enable" data-action="enable" onClick="plugAddEdit('修改插件','__MODULE__/Plugin/plugAddEdit/id/{$vo.pl_id}','800','500')"><i class="fa fa-check"></i> 修改</a>
           <a href="javascript:;" class="btn btn-primary btn-uninstall" onClick="update_state('plugin','pl_id={$vo.pl_id}','pl_state','1','安装','2')"><i class="fa fa-times"></i> 安装</a>
         </if> 
       </p>
       </div>
     </div>
    </div>
    </volist>
    </div>
  </div>
</div>
<script type="text/javascript">
layer.config({extend: 'extend/layer.ext.js'})
//添加（修改）
function plugAddEdit(title,url,width,height){
	var pwd1 = '{$pwds}';
	layer.prompt({title: '输入任何口令，并确认', formType: 1}, function(pass, index){
		if(pwd1 == $.md5(pass)){
			layer.close(index);
			layer_show(title,url,width,height);
		}else{
			layer.msg("安全校验码错误，请联系开发工程师！", {icon: 2});
			return false;
		}
	});	
}
</script>
</body>
</html>